home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / CIncludes / ScalerStreamTypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-12  |  4.7 KB  |  148 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ScalerStreamTypes.h
  3.  
  4.      Contains:    Scaler streaming data structures and constants for OFA 1.x
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __SCALERSTREAMTYPES__
  19. #define __SCALERSTREAMTYPES__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __SFNTTYPES__
  25. #include <SFNTTypes.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. /* ScalerStream input/output types */
  51.  
  52. enum {
  53.     cexec68K                    = 0x0001,
  54.     truetypeStreamType            = 0x0001,
  55.     type1StreamType                = 0x0002,
  56.     type3StreamType                = 0x0004,
  57.     type42StreamType            = 0x0008,
  58.     type42GXStreamType            = 0x0010,
  59.     portableStreamType            = 0x0020,
  60.     flattenedStreamType            = 0x0040,
  61.     evenOddModifierStreamType    = 0x8000
  62. };
  63.  
  64. /* Possible streamed font formats */
  65. typedef unsigned long                     scalerStreamTypeFlag;
  66.  
  67. enum {
  68.     downloadStreamAction        = 0,                            /* Transmit the (possibly sparse) font data */
  69.     asciiDownloadStreamAction    = 1,                            /* Transmit font data to a 7-bit ASCII destination */
  70.     fontSizeQueryStreamAction    = 2,                            /* Estimate in-printer memory used if the font were downloaded */
  71.     encodingOnlyStreamAction    = 3,                            /* Transmit only the encoding for the font */
  72.     prerequisiteQueryStreamAction = 4,                            /* Return a list of prerequisite items needed for the font */
  73.     prerequisiteItemStreamAction = 5,                            /* Transmit a specified prerequisite item */
  74.     variationQueryStreamAction    = 6,                            /* Return information regarding support for variation streaming */
  75.     variationPSOperatorStreamAction = 7                            /* Transmit Postscript code necessary to effect variation of a font */
  76. };
  77.  
  78. typedef long                             scalerStreamAction;
  79.  
  80. enum {
  81.     selectAllVariations            = -1                            /* Special variationCount value meaning include all variation data */
  82. };
  83.  
  84.  
  85. struct scalerPrerequisiteItem {
  86.     long                             enumeration;                /* Shorthand tag identifying the item */
  87.     long                             size;                        /* Worst case vm in printer item requires */
  88.     unsigned char                     name[1];                    /* Name to be used by the client when emitting the item (Pascal string) */
  89. };
  90. typedef struct scalerPrerequisiteItem    scalerPrerequisiteItem;
  91.  
  92. struct scalerStream {
  93.     const void *                    streamRefCon;                /* <-    private reference for client */
  94.     const char *                    targetVersion;                /* <-    e.g. Postscript printer name (C string) */
  95.     scalerStreamTypeFlag             types;                        /* <->    Data stream formats desired/supplied */
  96.     scalerStreamAction                 action;                        /* <-     What action to take */
  97.     unsigned long                     memorySize;                    /* ->    Worst case memory use (vm) in printer or as sfnt */
  98.     long                             variationCount;                /* <-    The number of variations, or selectAllVariations */
  99.     const void *                    variations;                    /* <-    A pointer to an array of the variations (gxFontVariation) */
  100.     union {
  101.                                                                 /* Normal font streaming information*/
  102.         struct {
  103.             const unsigned short *            encoding;            /* <-    Intention is * unsigned short[256] */
  104.             long *                            glyphBits;            /* <->    Bitvector: a bit for each glyph, 1 = desired/supplied */
  105.             char *                            name;                /* <->    The printer font name to use/used (C string) */
  106.         }                                 font;
  107.  
  108.                                                                 /* Used to obtain a list of prerequisites from the scaler*/
  109.         struct {
  110.             long                             size;                /* ->     Size of the prereq. list in bytes (0 indicates no prerequisites)*/
  111.             void *                            list;                /* <-    Pointer to client block to hold list (nil = list size query only) */
  112.         }                                 prerequisiteQuery;
  113.  
  114.         long                             prerequisiteItem;        /* <-     Enumeration value for the prerequisite item to be streamed.*/
  115.  
  116.         long                             variationQueryResult;    /* ->    Output from the variationQueryStreamAction */
  117.     }                                 info;
  118. };
  119. typedef struct scalerStream                scalerStream;
  120.  
  121. struct scalerStreamData {
  122.     long                             hexFlag;                    /* Indicates that the data is to be interpreted as hex, versus binary */
  123.     long                             byteCount;                    /* Number of bytes in the data being streamed */
  124.     const void *                    data;                        /* Pointer to the data being streamed */
  125. };
  126. typedef struct scalerStreamData            scalerStreamData;
  127.  
  128. #if PRAGMA_STRUCT_ALIGN
  129.     #pragma options align=reset
  130. #elif PRAGMA_STRUCT_PACKPUSH
  131.     #pragma pack(pop)
  132. #elif PRAGMA_STRUCT_PACK
  133.     #pragma pack()
  134. #endif
  135.  
  136. #ifdef PRAGMA_IMPORT_OFF
  137. #pragma import off
  138. #elif PRAGMA_IMPORT
  139. #pragma import reset
  140. #endif
  141.  
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145.  
  146. #endif /* __SCALERSTREAMTYPES__ */
  147.  
  148.